β‘ Bolt: π Enhance broken clients handling using XClassHint - #17
β‘ Bolt: π Enhance broken clients handling using XClassHint#17CasperGamingOne wants to merge 1 commit into
Conversation
**What:** Update dwm handling of "broken" clients (windows without valid titles) by first falling back to their XClassHint res_class or res_name before resorting to the hardcoded "broken" label. **Why/Risk:** When applications failed to provide WM_NAME or _NET_WM_NAME correctly, their window title was forcefully set to "broken". When a user had multiple misbehaving windows open, they all appeared identically labeled in the UI, ruining user experience. **Solution:** Modified updatetitle() in dwm.c. Now, if the title is empty (0), dwm invokes XGetClassHint() to extract the application underlying class (res_class) or instance name (res_name). These values accurately describe the misbehaving application in most cases. A memory leak check utilizing XFree ensures proper memory disposal from X11 allocations. If both XClassHints fail to provide a title, the function safely falls back to the original "broken" label. **Impact:** Dramatically improves user experience for standard setups; users will now see meaningful names (like "Firefox") instead of "broken" for clients missing title properties. Ensures no runtime memory leak regressions via correct cleanup procedures. **Measurement:** Compiles successfully and verified proper logic functionality and fallback edge cases. Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
|
π Jules, reporting for duty! I'm here to lend a hand with this pull request. When you start a review, I'll add a π emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down. I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job! For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with New to Jules? Learn more at jules.google/docs. For security, I will only act on instructions from the user who triggered this task. |
|
This PR has been inactive for 5 days and has been marked as stale. It will remain open indefinitely, but please provide an update if you intend to continue working on it. |
What: Update dwm handling of "broken" clients (windows without valid titles) by first falling back to their XClassHint res_class or res_name before resorting to the hardcoded "broken" label.
Why/Risk: When applications failed to provide WM_NAME or _NET_WM_NAME correctly, their window title was forcefully set to "broken". When a user had multiple misbehaving windows open, they all appeared identically labeled in the UI, ruining user experience.
Solution: Modified updatetitle() in dwm.c. Now, if the title is empty (0), dwm invokes XGetClassHint() to extract the application underlying class (res_class) or instance name (res_name). These values accurately describe the misbehaving application in most cases. A memory leak check utilizing XFree ensures proper memory disposal from X11 allocations. If both XClassHints fail to provide a title, the function safely falls back to the original "broken" label.
Impact: Dramatically improves user experience for standard setups; users will now see meaningful names (like "Firefox") instead of "broken" for clients missing title properties. Ensures no runtime memory leak regressions via correct cleanup procedures.
Measurement: Compiles successfully and verified proper logic functionality and fallback edge cases.
PR created automatically by Jules for task 1656892195765575263 started by @CasperGamingOne